package commonClasses;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;

public class JournalNames {
	public static void main(String args[]) throws FileNotFoundException, IOException{
		ArrayList<String> ar = new ArrayList<String>();
		PrintStream ps= new PrintStream("J:\\BC3_IMT_Training\\Journal names.txt");
		
		FileReader ff = new FileReader(
				"J:\\BC3_IMT_Training\\Journal name and lines.txt");

		int count=1;
		BufferedReader fb = new BufferedReader(ff);
		String name = fb.readLine();
		while(name!=null){
			String[] sp=name.split("\t");
			if(ar.contains(sp[1])==false){
				ar.add(sp[1]);
				ps.println(count+" : "+sp[1]);
				count++;
			}
			name=fb.readLine();
		}
		System.out.println(count);
		

		
	}

}
